package com.xhwl.centiotdata.service.cent;

import com.xhwl.common.dto.cent.sdata.AccountOrganizationDTO;
import com.xhwl.common.dto.cent.sdata.OrganizationDTO;
import com.xhwl.common.enums.OrganizationTypeEnum;
import com.xhwl.common.pojo.cent.sdata.Organization;
import com.xhwl.common.pojo.cent.sdata.OrganizationType;
import com.xhwl.common.pojo.cent.sdata.Room;
import com.xhwl.common.query.cent.sdata.OrganizationQuery;
import com.xhwl.common.query.cent.sdata.OrganizationTypeQuery;
import com.xhwl.common.query.cent.sdata.RoomQuery;
import feign.Param;
import feign.RequestLine;
import org.springframework.cloud.openfeign.FeignClient;

import java.util.List;
import java.util.Map;

/**
 * @Author luowei
 * @Date 2023/4/25 16:06
 * @Description:
 * @Version 1.0
 */
@FeignClient(value = "cent-data-core")
public interface IOrganizationService {

    @RequestLine(value = "POST /organization-service/batch-full-name")
    Map<Integer, String> batchFullName(@Param("organizationQuery") OrganizationQuery organizationQuery);

    @RequestLine(value = "POST /room-service/list")
    List<Room> list(@Param("roomQuery") RoomQuery roomQuery);

    @RequestLine(value = "POST /organization-service/tree")
    List<OrganizationDTO> tree(@Param("organizationQuery") OrganizationQuery organizationQuery);

    @RequestLine(value = "POST /organization-service/type")
    List<OrganizationTypeEnum> type(@Param("industryId") Short industryId);

    @RequestLine(value = "POST /organization-type-service/list")
    List<OrganizationType> list(@Param(value = "organizationTypeQuery") OrganizationTypeQuery organizationTypeQuery);

    @RequestLine(value = "POST /room-service/one")
    Room one(@Param("roomQuery") RoomQuery roomQuery);

    @RequestLine(value = "POST /organization-service/list")
    List<Organization> list(@Param("organizationQuery") OrganizationQuery organizationQuery);

    @RequestLine(value = "POST /organization-service/tree")
    List<OrganizationDTO> getOrgTree(@Param("organizationQuery") OrganizationQuery organizationQuery);

    /**
     * 根据帐号id获取关联的空间id
     * @param accountIds
     * @return
     */
    @RequestLine(value = "POST /account-organization-service/group-space-list")
    List<AccountOrganizationDTO> groupSpaceList(@Param("accountIds") List<Integer> accountIds);

}
